package com.tao.clients;

import com.tao.param.CartListParam;
import com.tao.param.PageParam;
import com.tao.pojo.User;
import com.tao.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author 86130
 * 用户的客户端
 */
@FeignClient("user-service")
public interface UserClient {
    /**
     * 用户列表展示
     * @param pageParam
     * @return
     */
    @PostMapping("/user/admin/list")
    R adminListPage(@RequestBody PageParam pageParam);

    /**
     * 用户删除
     *
     * @param cartListParam
     * @return
     */
    @PostMapping("/user/admin/remove")
    R adminRemove(@RequestBody CartListParam cartListParam);

    /**
     * 用户更新
     * @param user
     * @return
     */
    @PostMapping("/user/admin/update")
    R adminUpdate(@RequestBody User user);

    /**
     * 用户添加
     * @param user
     * @return
     */
    @PostMapping("/user/admin/save")
    R adminSave(@RequestBody User user);
}
